package com.tedu._03vehicle.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class UserRegParam {
    @NotNull(message = "用户名不能为null")
//    @NotEmpty(message = "用户名不能为null也不能为空字符串")
//    @NotBlank(message ="用户名不能为null也不能为空字符串或者空格串")
//    @Size(min = 6,max = 10,message = "用户名信息必须在6-10位之间")
    @Pattern(regexp = "[\\u4e00-\\u9fa5]{1,7}|[a-zA-Z]{1,14}")
    @Schema(description = "用户名",required = true)
    private String username;
    @Pattern(regexp = "(?=.*[A-Za-z])(?=.*[\\d!@#$%^&*()_+{}\\\":;'<>?,.\\/\\-=|])(?!.*[\\s\\u4e00-\\u9fa5])[A-Za-z\\d!@#$%^&*()_+{}\\\":;'<>?,.\\/\\-=|]{8,14}",message = "密码格式不合法")
    @Schema(description = "密码",required = true)
    private String password;
    @Schema(description = "邮箱",required = true)
    @Email(message = "邮箱格式不合法")
    private String email;
    @Schema(description = "手机号",required = true)
    private String phone;
}
